﻿<UserControl x:Class="BTM_Client_Application.GraphControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sparrow="http://sparrowtoolkit.codeplex.com/wpf"
             xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="268" d:DesignWidth="643">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyles.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/MyResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border Grid.Row="0" BorderThickness="1,1,1,0" BorderBrush="Gray" SnapsToDevicePixels="True">
            <DockPanel Name="ItemsPanel" HorizontalAlignment="Stretch" LastChildFill="True" Background="{DynamicResource AccentColorBrush}">
                <Grid Name="LogRefreshButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                <Grid Name="FilterClearButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                <Grid Name="SelectionButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                
                <!--<Button Name="LogRefreshButton" VerticalAlignment="Center" Margin="5,0,0,0" Content="Refresh" Click="LogRefreshButton_OnClick"/>
                <Button Name="FilterClearButton" VerticalAlignment="Center" Margin="5,0,0,0" Content="Clear" Click="FilterClearButton_OnClick"/>
                <Button Name="SelectionButton" VerticalAlignment="Center" Margin="5,0,0,0" Content="Selection" Click="SelectionButton_OnClick"/>-->
                <Grid Name="FilterContainer" Margin="5,0,0,0"/>
            </DockPanel>
        </Border>
        <Grid Grid.Row="1" Name="GraphContainer">
            
        </Grid>
        <oxy:Plot Name="PlotBox" Grid.Row="1" Model="{Binding _plotModel}">
            <oxy:Plot.Axes>
                <oxy:DateTimeAxis Position="Bottom" StringFormat="dd/MM" Key="Date"/>
                <oxy:LinearAxis Position="Left" Key="EventCount"/>
            </oxy:Plot.Axes>
        </oxy:Plot>
        
        
        <!--<sparrow:SparrowChart Name="GraphBox" Grid.Row="1" Series="{Binding MySeriesCollection}" Theme="Metro" Margin="0,5,0,0" IsRefresh="True">
            <sparrow:SparrowChart.XAxis>
                <sparrow:DateTimeXAxis/>
            </sparrow:SparrowChart.XAxis>
            <sparrow:SparrowChart.YAxis>
                <sparrow:LinearYAxis/>
            </sparrow:SparrowChart.YAxis>
            <sparrow:SparrowChart.Legend>
                <sparrow:Legend Name="GraphLegend" Header="Legend" HorizontalAlignment="Right" ShowIcon="True" LegendPosition="Inside" Dock="Right" CornerRadius="4"/>
            </sparrow:SparrowChart.Legend>
        </sparrow:SparrowChart>-->
    </Grid>
</UserControl>
